package com.song.JavaThread_day02.ch2_6;

public class TaskMain {

	public static void main(String[] args) {
		
		PricesInfo info = new PricesInfo();
		Reader reader[] = new Reader[5];
		Thread rthread[] = new Thread[5];
		for(int i=0; i<5; i++){
			reader[i] = new Reader(info);
			rthread[i] = new Thread(reader[i]);
		}
		Writer writer = new Writer(info);
		Thread wthread = new Thread(writer);
		for(int i =0 ;i<5;i++)
		{
			rthread[i].start();
		}
		wthread.start();
			
	}

}
